@font-face {
    font-family: 'lakeshore';
    src: url('fonts/LAKESHOR-webfont.eot');
    src: url('fonts/LAKESHOR-webfont.eot?#iefix') format('embedded-opentype'),
        url('fonts/LAKESHOR-webfont.woff') format('woff'),
        url('fonts/LAKESHOR-webfont.ttf') format('truetype'),
        url('fonts/LAKESHOR-webfont.svg#lakeshore') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'airstreamregular';
    src: url('fonts/Airstream-webfont.eot');
    src: url('fonts/Airstream-webfont.eot?#iefix') format('embedded-opentype'),
        url('fonts/Airstream-webfont.woff') format('woff'),
        url('fonts/Airstream-webfont.ttf') format('truetype'),
        url('fonts/Airstream-webfont.svg#lakeshore') format('svg');
    font-weight: normal;
    font-style: normal;
}

html, body{
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;

    font-size: 10px;
    background: rgb(149, 194, 215);
}

a {
    text-decoration: none;
}

.main-header {
    /* 无须进行拉伸，如有必要将会收缩，自动计算大小 */
    flex: 0 1 auto;
}

.logo-text {
    background: white;

    text-align: center;
    text-transform: uppercase;
    font-family: lakeshore;
    font-size: 37px;
}

.main-content {
    flex: 1 1 auto;

    display: flex;
    flex-direction: column;
}

/* ul 标签 */
.thumbnail-list {
    flex: 0 1 auto;

    /* order默认为0，order值小的先渲染 */
    order: 2;

    display: flex;
    justify-content: space-between;
    
    list-style: none;
    padding: 0;

    /* 禁止换行并允许滚动 */
    white-space: nowrap;
    overflow-x: auto;
}

/* ～叫兄弟选择器，我觉得弟弟选择器更能清楚地表达其含义 */
/* .thumbnail-item ~ .thumbnail-item {
    margin-top: 10px;
} */

.thumbnail-item {
    display: inline-block;
    
    /* 这里把width换成min-width和max-width好像没有任何用处 */
    min-width: 120px;
    max-width: 120px;
    border: 1px solid rgb(100%, 100%, 100%);
    border: 1px solid rgba(100%, 100%, 100%, 0.8);

    /* 这样能更好地避免悬停放大可能造成的图片截断 */
    transform: scale(0.8);
    transition:  transform 133ms ease-in-out;
}

.thumbnail-item:hover {
    transform: scale(1.0);
}

.thumbnail-image {
    /* display: inline 会为文本预留基线的高度 */
    display: block;
    width: 100%;
}

/* span 标签 */
.thumbnail-title {
    display: block;
    margin: 0;
    padding: 4px 10px;

    background: rgb(96, 125, 139);
    color: rgb(202, 238, 255);

    font-size: 18px;
}

.detail-image-container {
    flex: 1 1 auto;

    /* 让detail-image-frame在detail-image-container内居中 */
    /* 我不理解为什么居中之后frame明显变小了 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.detail-image-frame {
    text-align: center;

    /* 设置detail-image-title位置 */
    position: relative;

    transition: transform 333ms cubic-bezier(1,.06,.28,1);
}

/* 基于类的过渡效果 */
.is-tiny {
    transform: scale(0.001);
    transition: transform 0ms;
}

.detail-image {
    /* 限制img的宽度，使得img和文字能在同一行 */
    max-height: 395px;
    max-width: 90%;
}

.detail-image-title {
    position: absolute;
    bottom: -16px;
    left: 4px;

    font-family: airstreamregular;
    color: white;
    /* text-shadow: hoff voff blur #000; */
    text-shadow: 1px 2px 9px rgba(0, 0, 0, 0.9);
    font-size: 40px;
}

.hidden-detail .detail-image-container {
    display: none;
}

.hidden-detail .thumbnail-list {
    flex-direction: column;
    align-items: center;
    
    margin: 0 auto;
}

.hidden-detail .thumbnail-item {
    max-width: 85%;
}

@media all and (min-width: 768px) {
    .main-content {
        flex-direction: row;
        overflow: hidden;
        margin: 0 10px;
    }

    .thumbnail-list {
        order: 0;
        flex-direction: column;
        /* padding: 0 10px; */
    }

    .thumbnail-item {
        /* 覆盖之前的max-width */
        max-width: 260px;
    }

    .detail-image {
        max-height: none;
    }

    .hidden-detail .thumbnail-item {
        max-width: 75%;
    }
}
